<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"    
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    
    <h:head>
	<title>Market Grabber - Hand out</title>
</h:head>

<h:body>
	<ui:composition template="./template.xhtml">
		<ui:define name="siteheader">
                Hand out
        </ui:define>
		<ui:define name="leftmenu">
    		<li><h:link outcome="inbox">Inbox</h:link></li>
		</ui:define>

		<ui:define name="maincontent">
			
				<h2>Hand out</h2><br />
				<table>
					<thead>
						<tr>
							<th>Item Name</th>
							<th>Amount</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${user.toHandOut}" var="item">
							<tr>
								<td>#{item.name}</td>
								<td>#{item.number}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<h:form>
					<h:commandButton action="${user.finishTask()}" value="Done"/>
				</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>